package com.kahluastudios.mealfinder.desktop.client;

import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Hyperlink;
import com.google.gwt.user.client.ui.PasswordTextBox;
import com.google.gwt.user.client.ui.TextBox;
import com.google.gwt.user.client.ui.VerticalPanel;

public class LogonPanel extends VerticalPanel {
   
	private final Messages messages;	
	
    private TextBox emailField;
    private PasswordTextBox passwordField;
    private Hyperlink forgotPasswordLink;
    private Button logonButton;
    private Button registerButton;
    
    
   
    public LogonPanel() {
    	messages = GWT.create(Messages.class);
    	
    	this.emailField = new TextBox();
    	add(this.emailField);
    	
    	this.passwordField = new PasswordTextBox();
    	add(this.passwordField);
    	
    	this.logonButton = new Button();
    	this.logonButton.setText(this.messages.logonButtonText());
    	
    	this.registerButton = new Button();
    	this.registerButton.setText(this.messages.signUpButtonText());
    	
    	HorizontalPanel buttonPanel = new HorizontalPanel();
//    	buttonPanel.setHorizontalAlignment(ALIGN_LEFT);
//    	buttonPanel.setHorizontalAlignment(ALIGN_RIGHT);
    	buttonPanel.add(this.logonButton);
    	buttonPanel.add(this.registerButton);
    	
    	add(buttonPanel);
    	
    	this.forgotPasswordLink = new Hyperlink();
    	this.forgotPasswordLink.setText(this.messages.resetPasswordLinkText());
    	add(this.forgotPasswordLink);
    	
	}
}
